import h from './mysnabbdom/h'
import patch from './mysnabbdom/patch'

// let oldVnode = h('h1', {}, '你好')
let oldVnode = h('ul', {}, [
    h('li', { key: 'A' }, 'A'),
    h('li', { key: 'B' }, 'B'),
    h('li', { key: 'C' }, 'C'),
    h('li', { key: 'D' }, 'D'),
    h('li', { key: 'E' }, 'E'),
])
patch(container, oldVnode)

btn.onclick = () => {
    let newVnode = h('ul', {}, [
        h('li', { key: 'Q' }, 'Q'),
        h('li', { key: 'T' }, 'T'),
        h('li', { key: 'E' }, 'E'),
        h('li', { key: 'B' }, 'B'),
        h('li', { key: 'A' }, 'A'),
        h('li', { key: 'D' }, 'D'),
        h('li', { key: 'C' }, 'C'),
        h('li', { key: 'V' }, 'V'),
    ])
    patch(oldVnode, newVnode)
}